<template>
    <div>
        <el-form ref="form" :model="form" label-width="115px" :disabled="form.disabled">
            <el-row>
                <el-col :span="18">
                    <el-form-item label="关联项目">
                        <el-input v-model="form.xiangmumingcheng">
                             <el-button slot="append" icon="el-icon-search" type="primary" @click="innerTableVisible =  true"></el-button>
                        </el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="所属市县/区">
                      <el-cascader
                         disabled
                         v-model="form.shixian"
                         :options="data"
                         :props="{value: 'name', label: 'name', children: 'children', checkStrictly: true}"
                         ></el-cascader>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-divider></el-divider>
                </el-col>
                <el-col :span="18">
                    <el-form-item label="违规内容">
                        <el-input v-model="form.neirong" type="textarea" :autosize="{ minRows: 2}"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="整改材料">
                         <upload></upload>
                    </el-form-item>
                </el-col>
            </el-row>
            <div  class="dialog-footer"v-if="!form.disabled">
                <el-button @click="saveEdit">取 消</el-button>
                <el-button type="primary" @click="saveEdit">确 定</el-button>
            </div>
        </el-form>

         <!-- 关联项目 -->
        <el-dialog title="关联项目" :visible.sync="innerTableVisible" width="80%" append-to-body>
            <projectTable @close="innerTableVisible = false" :form="form" :isComponent="true" type="acceptManage"></projectTable>
        </el-dialog>
    </div>
</template>
<script>
import {data} from '@/components/common/area';
import {GetFList} from '@/components/common/filter';
import projectTable from '@/components/page/programSummarize';
export default {
    components: {
        projectTable
    },
    props: {
        editVisible: {
            default : false
        },
        form: {
            default: () => {},
        },
    },
    data() {
        return{
            projectTypeList: GetFList('projectType'),
            remindTypeList: GetFList('remindType'),
            data: data,
            innerTableVisible: false,
        }
    },
    methods: {
        saveEdit() {
            this.$emit('close')
        }
    }
}
</script>
<style scoped>
    .dialog-footer {
        text-align: right
    }
</style>